<%@page import="java.sql.*,java.util.*"%>
<%
String fname=request.getParameter("firstname");
String lname=request.getParameter("lastname");
String uname=request.getParameter("username");
String pass=request.getParameter("pwd");
String comp=request.getParameter("companyname");
String street1=request.getParameter("street1");
String street2=request.getParameter("street2");
String zipcode=request.getParameter("zipcode");
String tel=request.getParameter("tel");
String url = "jdbc:mysql://localhost:3306/ismi";
Connection con;
ResultSet rs;
String s;
String sqlstr = "SELECT * FROM account";
System.out.println("we");
               try 
               {
                       Class.forName("com.mysql.jdbc.Driver");
               } 
               catch(java.lang.ClassNotFoundException e) 
               {
                       System.err.print("ClassNotFoundException: ");
                       System.err.println(e.getMessage());
               }

               try
               {
                       con = DriverManager.getConnection(url,"root", "csi518");
                       System.out.println("test");
                       Statement st = con.createStatement();
                       rs = st.executeQuery(sqlstr);

                       System.out.println("Rows are :");
                       while(rs.next())
                       {
                               s = rs.getString(1);
                                 System.out.println(s);
                       }
                       
                            rs.close();
                       st.close();
                       con.close();

               } 
               catch(SQLException ex) 
               {
                       System.err.println("SQLException: " + ex.getMessage());
               }

 
           response.sendRedirect("ThankYou.jsp");
        
       // catch(Exception e){
        //System.out.print(e);
        //e.printStackTrace();
        //}
        %>